package xerr

// 成功返回
const OK uint32 = 200

/**(前3位代表业务,后三位代表具体功能)**/

// 全局错误码
const (
	ServerCommonError         uint32 = 1001
	RequestParamError         uint32 = 1002
	TokenExpireError          uint32 = 1003
	TokenGenerateError        uint32 = 1004
	DbError                   uint32 = 1005
	DbUpdateAffectedZeroError uint32 = 1006
	ThirdPartRequestError     uint32 = 1007
	RedisLockFail             uint32 = 1008
	PaymentFail               uint32 = 1009
	NotAllowEmptyParam        uint32 = 1100
	TokenVerifyFailedError    uint32 = 1101
	ParseTimeError            uint32 = 1102
)

// 用户模块
const (
	UserNotExist          uint32 = 200001
	AuthFail              uint32 = 200002
	GetUserSignFail       uint32 = 200003
	UserTypeNotAllowLogin uint32 = 200004
	UserAlreadyExist      uint32 = 200005
	UserUidNotMatch       uint32 = 200006
	UserRewardLimitError  uint32 = 200007
)

// 钱包模块
const (
	WalletNotFound                    uint32 = 300001 // 钱包不存在
	WalletFlowStateNotAllow           uint32 = 300002 // 钱包流水状态不允许操作
	WalletDepositAmountError          uint32 = 300003 // 钱包充值金额错误
	WalletBalanceNotEnoughForWithdraw uint32 = 300004 // 钱包余额不足提现
	WalletBalanceNotEnoughForTransfer uint32 = 300005 // 钱包余额不足转账
	WalletBalanceNotEnoughForOrder    uint32 = 300006 // 钱包余额不足投注
	WalletFlowNotFound                uint32 = 300007 // 钱包流水不存在
	WalletNotReady                    uint32 = 300008 // 钱包未准备好
	WalletTransferError               uint32 = 300009 // 钱包转账失败
	WalletWithdrawError               uint32 = 300010 // 钱包提现失败
	WalletDepositError                uint32 = 300011 // 钱包充值失败
)
